<template>
    <!--订单详情组件-->
   <div>
     <van-card
         :num="dishInfo.number"
         :price="dishInfo.price.toFixed(2)"
         :desc="dishInfo.description"
         :title="dishInfo.title"
         :thumb="dishInfo.imgUrl"
         class="dishDetailCard"
     >
       <template #tags>
         <van-tag
             type="primary"
             mark>
           {{dishInfo.dishCategory.categoryName}}
         </van-tag>
       </template>
       <template #footer>
         小计：
         <van-tag
             color="#ffe1e1"
             text-color="#ad0000"
             mark
             size="medium">
            ￥{{(dishInfo.price*dishInfo.number).toFixed(2)}}
         </van-tag>
       </template>
     </van-card>
   </div>
</template>

<script>
export default {
  name: "OrderDetail",
  props:["dishInfo"],
  data(){
    return {
        /*dishInfo:{
          "did": 22,
          "title": "百事可乐",
          "description": "碳酸饮料，约600ml",
          "imgUrl": "https://pic.quanjing.com/mg/lc/QJ6140709867.jpg@!350h",
          "dishCategory": {
            "cid": 5,
            "categoryName": "饮料"
          },
          "price": 4.0,
          "oversell": true,
          "sellVolume": null,
          "number": 17
        }*/
    }
  }
}
</script>

<style scoped>

</style>
